#!/bin/sh

time=`date +%Y%m%d-%H:%M:%S`

if [ "$1" = "crawler" ];
then
    nohup ./crawler > logs/crawler-${time}.log 2>&1 &
    tail -f logs/crawler-${time}.log
elif [ "$1" = "down" ];
then
    nohup ./downImage > logs/download-${time}.log 2>&1 &
    tail -f logs/download-${time}.log
else
    echo "参数错误"
fi
